<template>
  <div class="centent">
    <div class="cnetext-top">
      <div class="cnetext-top1">
        <span class="iconfont icon-zuojiantou" @click="fun1()"></span>
        <div class="brand">品牌专区</div>
        <div class="cnetext-top-right">
          <span class="iconfont icon-fenxiang" @click="fun2()"></span>
        </div>
      </div>
    </div>
    <div class="map01">
      <img src="img/dewumap01.jpg" alt="" />
    </div>
    <van-share-sheet
      v-model="showShare"
      title="立即分享给好友"
      :options="options"
    />
    <div class="centent-c">
      <h3>猜你喜欢</h3>
      <div class="map1">
        <van-image
          round
          width="0.5rem"
          height="0.5rem"
          style="border: 1px rgb(122, 118, 118) solid; margin-right: 0.1rem"
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpinkehao.com%2Fwp-content%2Fuploads%2F2021%2F08%2F13183b7279394e09baf40df4b65d22dc.jpg&refer=http%3A%2F%2Fpinkehao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648456509&t=196f05661617803f2a12f15f1ff72cd3"
        />
        <van-image
          round
          width="0.5rem"
          height="0.5rem"
          style="border: 1px rgb(122, 118, 118) solid; margin-right: 0.1rem"
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpinkehao.com%2Fwp-content%2Fuploads%2F2021%2F08%2F13183b7279394e09baf40df4b65d22dc.jpg&refer=http%3A%2F%2Fpinkehao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648456509&t=196f05661617803f2a12f15f1ff72cd3"
        />
        <van-image
          round
          width="0.5rem"
          height="0.5rem"
          style="border: 1px rgb(122, 118, 118) solid;  margin-right: 0.1rem"
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpinkehao.com%2Fwp-content%2Fuploads%2F2021%2F08%2F13183b7279394e09baf40df4b65d22dc.jpg&refer=http%3A%2F%2Fpinkehao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648456509&t=196f05661617803f2a12f15f1ff72cd3"
        />
        <van-image
          round
          width="0.5rem"
          height="0.5rem"
          style="border: 1px rgb(122, 118, 118) solid; margin-right: 0.1rem"
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpinkehao.com%2Fwp-content%2Fuploads%2F2021%2F08%2F13183b7279394e09baf40df4b65d22dc.jpg&refer=http%3A%2F%2Fpinkehao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648456509&t=196f05661617803f2a12f15f1ff72cd3"
        />
        <van-image
          round
          width="0.5rem"
          height="0.5rem"
          style="border: 1px rgb(122, 118, 118) solid; margin-right: 0.1rem"
          src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpinkehao.com%2Fwp-content%2Fuploads%2F2021%2F08%2F13183b7279394e09baf40df4b65d22dc.jpg&refer=http%3A%2F%2Fpinkehao.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1648456509&t=196f05661617803f2a12f15f1ff72cd3"
        />
      </div>
    </div>
    <div class="centent-b">
      <h3>热门分类</h3>
      <div class="centent-d"><span> 奢品大牌</span><span> 明星主理</span><span>潮流品牌</span><span>运动设计师品牌</span><span>最新入驻</span
      ><span>运动户外</span></div>
    </div>
     <div class="centent-e">
      <h3>品牌榜单</h3>
      <div class="centent-f"><span> 热销榜
        <Zi :title="textsss"/></span><span> 飙升榜
           <Zi @xiaoming="demo">
          <h1 slot="xiaoming">你好我是槽口</h1>
             </Zi></span><span>新牌榜</span>
      </div>
      <button @click="funmixin()">mixin</button>
      <div>
       filters {{arr |bd}}
      </div>
      <button @click="funf('F')">点我去F</button>
       <keep-alive>
      <component :is="com"></component>
        </keep-alive>
        <h1>{{obj.name}}----{{obj.age}}</h1>
        <button @click="funobj()">点我添加新内容</button>
    </div>

  </div>
</template>

<script>
import { Image as VanImage } from "vant";
import brandF from "./brandF.vue"
import Eventbus from "../../eventBus"
Vue.use(VanImage);
import Vue from "vue";
import { ShareSheet } from "vant";
import "vant/lib/index.css";
Vue.use(ShareSheet);
import Zi from "./brandF.vue"
import {demo} from "../../mixin"
export default {
  activated(){
        console.log("进入到keep-alive管理的组件了")
    },
    deactivated(){
        console.log("离开了keep-alive管理的组件了")
    },
  filters:{
        bd(arr){

                return arr.push(123)
        }
    },
   mixins:[demo],
  mounted(){
      Eventbus.$on("zi",(val)=>{
            console.log(val)
        })
  },
 components:{
        Zi,
        brandF
    },
  methods: {
    funobj(){
 this.obj.age=18
 console.log(this.obj.age);
    },
    funf(data){
            this.com=data
        },
    fun1() {
      this.$router.go(-1);
    },
    fun2() {
      this.showShare = true;
    },
    demo(text){
            console.log(text)
        },
  },
  data() {
    return {
      obj:{
        name:"xiaoming1"
      },
      com:"",
      arr:[1,12,123],
      showShare: false,
      textsss:111,
      options: [
        [
          { name: "微信", icon: "wechat" },
          { name: "朋友圈", icon: "wechat-moments" },
          { name: "微博", icon: "weibo" },
          { name: "QQ", icon: "qq" },
        ],
        [
          { name: "复制链接", icon: "link" },
          { name: "分享海报", icon: "poster" },
          { name: "二维码", icon: "qrcode" },
          { name: "小程序码", icon: "weapp-qrcode" },
        ],
      ],
    };
  },
};
</script>

<style scoped>
.map1 {
  width: 95%;
  margin: auto;
  margin-top: 0.1rem;
}

.centent-c {
  width: 90%;
  height: 1rem;
  margin: auto;
  margin-top: 0.1rem;
  margin-bottom: 0rem;
}
.centent-b {
  width: 90%;
  height: 1rem;
  margin: auto;
  margin-top: 0.1rem;
  margin-bottom: 0rem;
}
.centent-e{
  width: 90%;
  height: 1rem;
  margin: auto;
  margin-top: 1rem;
  margin-bottom: 0rem;
}
.centent-d {
flex-wrap: wrap;
  display: flex;
  justify-content: space-around;
}
.centent-f {
flex-wrap: wrap;
  display: flex;
  justify-content: space-around;
  margin-top: .2rem;
}

.centent-d span{
  text-align: center;
  width: 30%;
  height: .5rem;
  line-height: .5rem;
  margin-top: .15rem;
  font-size: .12rem;
  border: 1px solid rgb(122, 118, 118);
  background-image: url("../../../public/img/dewumap01.jpg");
  background-size: 100% 100%;
  color: white;
}
.brand {
  color: white;
}
.map01 {
  width: 100%;
}
img {
  width: 100%;
}
.centent {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: scroll;
  width: 100%;
  position: relative;
}

.iconfont {
  color: white;
}
.cnetext-top {
  position: none;
  width: 100%;
  margin: auto;
  height: 0.6rem;
  line-height: 0.6rem;
  position: fixed;
  top: 0rem;
  z-index: 99;
  background-color: rgba(0, 0, 0, 0);
}
.cnetext-top1 {
  display: flex;
  justify-content: space-between;
  width: 90%;
  margin: auto;
}
</style>